package com.moonLight.weblog.common.domain.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.moonLight.weblog.common.domain.dos.BlogSettingsDO;

//mapper层
public interface BlogSettingsMapper extends BaseMapper<BlogSettingsDO> {
   default BlogSettingsDO selectByUserName(String username){
       LambdaQueryWrapper<BlogSettingsDO> queryWrapper = new LambdaQueryWrapper<>();
       queryWrapper.eq(BlogSettingsDO::getAuthor,username);
       BlogSettingsDO blogSettingsDO = selectOne(queryWrapper);
       return blogSettingsDO;
   }
}
